Skip to content

test(windows): pin the real-process branch and the Arguments binding contract (#512) - #589

Merged
localai-bot merged 1 commit into
mainfrom
row/ENG-RELEASE-WINDOWS-CONTRACT-PINS
Aug 14, 2026
Merged

test(windows): pin the real-process branch and the Arguments binding contract (#512)#589
localai-bot merged 1 commit into
mainfrom
row/ENG-RELEASE-WINDOWS-CONTRACT-PINS

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

Supersedes #588, which squash-merging #583 orphaned (mergeable=CONFLICTING — main carries one squashed commit where the stacked child's history expects the originals). Force-push is forbidden, so the delta is re-applied onto current main. The file is byte-identical to the reviewed contentgit diff b00d6199f -- scripts/build-windows-release.ps1 is empty.

A fresh review of #583 found four mutations surviving its contract suite. The two that matter: $exitCode = 0 in the real-process branch, and dropping the @ splat. Either means a future edit passes the contract suite silently while the Windows gate reports success for tests that failed or never ran — and that is the branch #583 restructured, and the branch that surfaced #584.

All four now RED. The seven already caught stay caught.

Two findings worth reading:

  • A naive omission test would hang a developer's terminal — an omitted mandatory parameter prompts under an interactive host, blocking until killed, and only reaches the binding error in CI where stdin isn't a tty. A test meaning one thing in CI and another on a desk. Asserted in an API runspace instead.
  • The @-splat mutation is nearly an equivalent mutant, disclosed rather than oversold: for a native executable both forms give identical argv under all three argument-passing modes. It is only observable when the program is a PowerShell script — which is exactly Windows release runner rejects empty process arguments #512's contract.

Operator gate: contract suite rc=0, and the previously-surviving mutation re-applied by hand fails with real-process nonzero exit status was accepted. agent-preflight.sh --staged green.

Not claimed green: windows-msvc-cpu needs #584, windows-msvc-vulkan needs #514.

🤖 Generated with Claude Code

…contract (#512)

FOLLOWING_AGENTS_PROTOCOL

Re-applied from row/ENG-RELEASE-WINDOWS-EMPTY-ARGS-FIX @ b00d619 onto current
main. That branch was stacked on #583, and squash-merging #583 orphaned it --
mergeable=CONFLICTING -- because main now carries one squashed commit where the
child's history expects the originals. Force-push is forbidden, so the delta is
re-applied here instead of rewriting the branch. The resulting file is
BYTE-IDENTICAL to the verified content: git diff b00d619 on this path is empty.

Pins two properties #583 left unguarded. A fresh review found four mutations
surviving its contract suite -- most importantly $exitCode = 0 in the
real-process branch, and dropping the @ splat. Either means a future edit passes
the contract suite SILENTLY while the Windows gate reports success for tests
that failed or never ran. That is the failure class this repo keeps paying for,
and it is the branch #583 restructured and the branch that surfaced #584.

All four now RED: real-branch $exitCode = 0; dropped @ splat; dropped Mandatory;
added AllowNull. The seven already caught stay caught, including the one that
distinguishes "forwarded an empty array" from "forwarded nothing" -- @($null)
has Count 1 and would otherwise sneak past.

Two findings worth keeping. A naive omission test would HANG A DEVELOPER'S
TERMINAL: an omitted mandatory parameter PROMPTS under an interactive console
host, blocking on "Arguments[0]:" until killed at 25 s under a pty, and only
reaches the binding error in CI where stdin is not a tty -- a test meaning one
thing in CI and another on a desk. It is asserted in an API runspace instead,
whose host cannot prompt, and the function under test is rebuilt from the live
definition's own source text so it tracks edits to the real parameter block.

And the @-splat mutation is nearly an equivalent mutant, disclosed rather than
oversold: for a NATIVE executable the splatted and unsplatted forms give
identical argv at 0, 1 and 3 elements under all three
$PSNativeCommandArgumentPassing modes including Windows. It is only observable
when the program is a PowerShell script, where an empty list otherwise arrives
as one array argument instead of zero -- which is exactly #512's contract.

The real-process arm drives the PowerShell host executing the script, resolved
from (Get-Process -Id $PID).Path: the one executable guaranteed to exist
wherever the script can run, so the IDENTICAL arm runs on Windows runners and
POSIX boxes with no platform branch. An arm that silently no-ops on one platform
would be its own version of the bug being fixed.

Operator gate: contract suite rc=0 on this tree, and the previously-surviving
real-branch mutation re-applied by hand fails with "real-process nonzero exit
status was accepted", tree restored byte-for-byte afterwards.

Still not green and not claimed to be: windows-msvc-cpu needs #584, vulkan needs
#514, #585 remains filed.

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [Claude Code]
@localai-bot
localai-bot merged commit 8a5de3a into main Aug 14, 2026
16 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants